package com.xywl.utils;


class ColorPoint extends Point {
    private String color;
    public ColorPoint(int x,int y,String color)
    {
        super(x,y);//调用副类的构造函数
        this.color=color;
    }
    public String getColor(){
        return color;
    }
    public void setColor(String color){
        this.color=color;
    }
    public String toString(){
        return String.format("(%d,%d,%s)",super.getX(),super.getY(),color);
    }
}